//
//  TutorialsNavigationController.m
//  TutorialsModule
//
//  Created by Augusto Guido on 28/09/09.
//  Copyright 2009 Moove-IT. All rights reserved.
//

#import "TutorialsNavigationController.h"
#import "TutorialsTableViewController.h"
#import "NewTutorialViewController2.h"


@implementation TutorialsNavigationController


 // The designated initializer.  Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
        // Custom initialization
		
		NSArray *objetos = [[NSArray alloc] initWithObjects:@"Tutorial 1",@"Tutorial 2", nil];
		
		TutorialsTableViewController *tutorialsTable = [[TutorialsTableViewController alloc] initWithNibName:@"TutorialsTableViewController" bundle:nil objects:objetos];
		
		[self pushViewController:tutorialsTable animated:NO];
		[objetos release];
		[tutorialsTable release];	
		
    }
    return self;
}

- (void)newTutorial
{
	/* Esto capaz que va en el table view controller ! lucho no es una base de datos. 
	 Para recargar datos */
	NewTutorialViewController2 *newTutorialViewController = [[NewTutorialViewController2 alloc] initWithNibName:@"NewTutorialViewController2" bundle:nil];
	newTutorialViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
//	self.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
	[self presentModalViewController:newTutorialViewController animated:YES];
	[newTutorialViewController release];
}

/*
// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView {
	
}
*/

/*
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
    [super viewDidLoad];
}
*/


// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
	return YES;
}


- (void)didReceiveMemoryWarning {
	// Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
	
	// Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
	// Release any retained subviews of the main view.
	// e.g. self.myOutlet = nil;
}


- (void)dealloc {
    [super dealloc];
}


@end
